package com.example.common.utils;

import com.example.sys.mapper.CommonMapper;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
public class SpringBeanUtils {

    @Resource
    private CommonMapper cm;

    @Resource
    private RedisTemplate<String, String> rs;


    public static CommonMapper commonMapper;

    public static RedisTemplate<String, String> redisString;

    @PostConstruct
    public void getCommonMapper() {
        commonMapper = this.cm;
    }

    @PostConstruct
    public void getRedisString() {
        redisString = this.rs;
    }
}
